<template>
    <div>
        APP
        <!-- 插槽-路由容器 -->
        <router-view></router-view>
        <Tabbar v-show="isTabbarShow"></Tabbar>
    </div>
</template>

<script setup>
import Tabbar from './components/Tabbar.vue';
import { useStore, mapState } from 'vuex';
import { computed } from 'vue';

const store = useStore() //this.$store

//vca不支持辅助函数，强行使用，需要改变this.$store指向
const state = mapState("TabbarModule", ["isTabbarShow"])
console.log(state.isTabbarShow);
state.isTabbarShow = state.isTabbarShow.bind({ $store: store })//改变this.$store指向
const isTabbarShow = computed(state.isTabbarShow)

</script>

<style>
* {
    margin: 0;
    padding: 0;
}

ul {
    list-style: none;
}
</style>